package com.sunyard.manage.apk;

import com.alibaba.fastjson.JSON;
import com.ctg.ag.sdk.biz.AepDeviceCommandClient;
import com.ctg.ag.sdk.biz.AepDeviceManagementClient;
import com.ctg.ag.sdk.biz.aep_device_command.QueryCommandListRequest;
import com.ctg.ag.sdk.biz.aep_device_management.QueryDeviceRequest;

/**
 * @author: ZhangShuai
 * @description:调用第三方接口(物联网平台)获取数据
 * @create: 2022-07-19 16:02
 **/
public class ApiWithSignature {//屏显钥匙 3

    public static void main(String[] args) throws Exception {
        testApiWithSignature();
    }

    public static void testApiWithSignature() throws Exception {
        //appid:59526    App Key:fFnM6gdK5u5   App Secret:z1EnCFfneO
        AepDeviceManagementClient client = AepDeviceManagementClient.newClient()
                .appKey("fFnM6gdK5u5").appSecret("z1EnCFfneO")
                .build();
        QueryDeviceRequest request = new QueryDeviceRequest();
        request.setParamMasterKey("ed1a58ccc74e4117ae97b6f9433b0ae8");
        request.setParamProductId(15000405);
        request.setParamDeviceId("eb8e9013d9d04b539bbfc4406dbe98ba");
        System.out.println("====" + client.QueryDevice(request));
        client.shutdown();
    }
}
